<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/wangeditor@latest/dist/wangEditor.min.js"></script>
    <script crossorigin="anonymous" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js"></script>
    <title>Document</title>
</head>

<body>
    <div id="dd"> <input type="file" name="" id="a" value="1111">
        <button class="aaa">提交</button></div>

    <img src="" alt="">
    <div id="div1">
        <p>欢迎使用 <b>wangEditor</b> 富文本编辑器</p>
    </div>
    <script>
        const E = window.wangEditor
        const editor = new E('#div1')
            // 或者 const editor = new E( document.getElementById('div1') )
        editor.create()

        // const a = document.querySelector('#a');
        console.log(a);
        var a = document.getElementById('a');
        a.addEventListener('change', function(e) {
            var files = e.target.files;
            imgU = window.URL.createObjectURL(files[0])
            const img = document.getElementsByTagName('img')[0];
            img.src = imgU
        })
    </script>
</body>

</html>